package io.github.uicdb.badskill.api;

import com.google.common.collect.ImmutableList;
import io.github.uicdb.badskill.SkillOption;
import net.minecraft.network.chat.Component;
import net.minecraft.world.entity.player.Player;

import java.util.List;

public interface CostumerConsumer {
    CostumerConsumer EMPTY=new CostumerConsumer() {

        @Override
        public boolean consume(Player player, String key, double amounts, SkillOption stack, boolean simulate) {
            return false;
        }

        @Override
        public boolean retreated(Player player, String key, double amounts, SkillOption stack, boolean backResources) {
            return false;
        }

        @Override
        public void enable(Player player, String key, double amounts, SkillOption stack) {

        }

        @Override
        public List<Component> getTooltips(Player player, String key, double amounts, SkillOption stack, boolean isRequirements) {
            return ImmutableList.of();
        }

        @Override
        public void disable(Player player, String key, double data, SkillOption option) {

        }
    };
    boolean consume(Player player, String key, double amounts, SkillOption stack, boolean simulate);
    boolean retreated(Player player,String key, double amounts, SkillOption stack,boolean backResources);
    void enable(Player player, String key, double amounts, SkillOption stack);
    List<Component> getTooltips(Player player,String key, double amounts, SkillOption stack,boolean isRequirements);
    default void tick(Player player,String key, double amounts, SkillOption stack){};

    void disable(Player player, String key, double data, SkillOption option);
}
